package kunipack;
//inheritance
class room
{
	int length,breadth;
	room(int x,int y)
	{
		length = x;
		breadth = y;
		
	}
	
	int area()
	{
		return(length*breadth);
	}
}

class bedroom extends room
{
	int height;
	bedroom(int x,int y,int z)
	{
		super(x,y);
		height = z;
		System.out.println("length"+length);
		System.out.println("breadth"+breadth);
		System.out.println("height"+height);
	}
		
	int volume()
	{
		return(length*breadth*height);
	}
}

public class Program19 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
       bedroom obj2 = new bedroom(10,20,30);
       int area1 = obj2.area();
       int vol1 = obj2.volume();
       System.out.println("area"+area1);
       System.out.println("volume"+vol1);
	}

}
